#ifndef TEXTVIEW_H
#define TEXTVIEW_H

#include "viewobject.h"
#include "paramobject.h"
#include <QLabel>
#include <QMovie>
#include <qdom.h>
#include <QTimer>
#include <QFrame>
#include <QEvent>
#include <QMouseEvent>
#include <QPoint>
#include "common.h"


typedef struct TextViewParam
{
    QString         m_textContent;
    QString         m_textFormat;
    TextViewParam()
    {
        m_textContent = "";
        m_textFormat = "";
    }
}TextViewParam;


class  TextView : public ViewObject
{
    Q_OBJECT
public:
    static int m_id;
    Q_INVOKABLE explicit TextView(QWidget *parent = 0);
    ~TextView();

    void ShowObject(QWidget*, QString filename = "", QString prefix = "", ProtocolData * ptr_data = NULL);

    void HideObject();

    void DestoryObject();

    void SetAttribute(std::string);

    void ParseXML(QDomElement* );

    void PacketXML(QDomElement*);

    void GetAttribute(std::string&);

private:
    bool GetBtwStartAndStop(int);

private:
    QLabel*                             m_label;
    TextViewParam*                      m_paramTextView;
};

#endif // TEXTVIEW_H
